
<div class="alert alert-danger-light " style="text-align: center">
    <p><i class="fa fa-info"></i> {:__('续费支付链接一定时间内会失效，需要重新打开当前页面获取最新的')}</p>
</div>

{if isset($url) }
<div class="col-md-12 col-xs-12">
    <div style="text-align: center">
        <img src="{:addon_url('facrm/order/qrcode',[],false)}?text={$url|htmlentities}" alt="" id='qrcodeimg' width="300px" />
        <p>扫码付款:{$row->number}</p>
    </div>
    <div style="text-align: center">
        <textarea name="" id="output" cols="30" rows="10" class="form-control" style="display: none">{$url|htmlentities}</textarea>
        <button type="button" class="btn btn-success btn-embossed btn-copy">{:__('复制续费付款链接')}</button>
    </div>

</div>
{/if}

<script>
    require.callback = function () {

        define('backend/facrm/contract/index', ['jquery', 'form'], function ($, Form) {
            var Controller = {
                payurl: function () {
                    require.config({
                        paths: {
                            'clipboard': '../addons/facrm/js/clipboard.min',
                        },
                    });
                    require(['clipboard'], function (ClipboardJS) {
                        //点击复制
                        var clipboard = new ClipboardJS('.btn-copy', {
                            text: function () {
                                return $('#output').val();
                            }
                        });
                        clipboard.on('success', function (e) {
                            Layer.msg("复制成功");
                            e.clearSelection();
                        });
                        var clipboardr = new ClipboardJS('.btn-copyr', {
                            text: function () {
                                return $('#routput').val();
                            }
                        });
                        clipboardr.on('success', function (e) {
                            Layer.msg("复制成功");
                            e.clearSelection();
                        });

                    });

                }
            };
            return Controller;
        });
    }
</script>


